/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package com.bap.ele.workbench.model.Course.impl;

import com.bap.ele.workbench.model.Course.COURSEelement;
import com.bap.ele.workbench.model.Course.COURSEobject;
import com.bap.ele.workbench.model.Course.COURSEstatus;
import com.bap.ele.workbench.model.Course.CourseFactory;
import com.bap.ele.workbench.model.Course.CoursePackage;
import com.bap.ele.workbench.model.Course.LEARNINGobject;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;

import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Package</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class CoursePackageImpl extends EPackageImpl implements CoursePackage {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass coursEelementEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass coursEobjectEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass courseEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass languageEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass chapterEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass learninGobjectEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass materialEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass requirementEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EClass previewEClass = null;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private EEnum coursEstatusEEnum = null;

	/**
	 * Creates an instance of the model <b>Package</b>, registered with
	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
	 * package URI value.
	 * <p>Note: the correct way to create the package is via the static
	 * factory method {@link #init init()}, which also performs
	 * initialization of the package, or returns the registered package,
	 * if one already exists.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see org.eclipse.emf.ecore.EPackage.Registry
	 * @see com.bap.ele.workbench.model.Course.CoursePackage#eNS_URI
	 * @see #init()
	 * @generated
	 */
	private CoursePackageImpl() {
		super(eNS_URI, CourseFactory.eINSTANCE);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static boolean isInited = false;

	/**
	 * Creates, registers, and initializes the <b>Package</b> for this
	 * model, and for any others upon which it depends.  Simple
	 * dependencies are satisfied by calling this method on all
	 * dependent packages before doing anything else.  This method drives
	 * initialization for interdependent packages directly, in parallel
	 * with this package, itself.
	 * <p>Of this package and its interdependencies, all packages which
	 * have not yet been registered by their URI values are first created
	 * and registered.  The packages are then initialized in two steps:
	 * meta-model objects for all of the packages are created before any
	 * are initialized, since one package's meta-model objects may refer to
	 * those of another.
	 * <p>Invocation of this method will not affect any packages that have
	 * already been initialized.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #eNS_URI
	 * @see #createPackageContents()
	 * @see #initializePackageContents()
	 * @generated
	 */
	public static CoursePackage init() {
		if (isInited) return (CoursePackage)EPackage.Registry.INSTANCE.getEPackage(CoursePackage.eNS_URI);

		// Obtain or create and register package
		CoursePackageImpl theCoursePackage = (CoursePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof CoursePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new CoursePackageImpl());

		isInited = true;

		// Create package meta-data objects
		theCoursePackage.createPackageContents();

		// Initialize created meta-data
		theCoursePackage.initializePackageContents();

		// Mark meta-data to indicate it can't be changed
		theCoursePackage.freeze();

		return theCoursePackage;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getCOURSEelement() {
		return coursEelementEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getCOURSEelement_Name() {
		return (EAttribute)coursEelementEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getCOURSEelement_Description() {
		return (EAttribute)coursEelementEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getCOURSEobject() {
		return coursEobjectEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getCOURSEobject_Order() {
		return (EAttribute)coursEobjectEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getCOURSEobject_Title() {
		return (EAttribute)coursEobjectEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getCOURSEobject_Authors() {
		return (EAttribute)coursEobjectEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getCOURSE() {
		return courseEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getCOURSE_Status() {
		return (EAttribute)courseEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getCOURSE_Keywords() {
		return (EAttribute)courseEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getCOURSE_Languages() {
		return (EReference)courseEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getLANGUAGE() {
		return languageEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getLANGUAGE_CourseObjects() {
		return (EReference)languageEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getLANGUAGE_Requirement() {
		return (EReference)languageEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getLANGUAGE_Preview() {
		return (EReference)languageEClass.getEStructuralFeatures().get(2);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getCHAPTER() {
		return chapterEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getCHAPTER_CourseObjects() {
		return (EReference)chapterEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getLEARNINGobject() {
		return learninGobjectEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getLEARNINGobject_Type() {
		return (EAttribute)learninGobjectEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getLEARNINGobject_Materials() {
		return (EReference)learninGobjectEClass.getEStructuralFeatures().get(1);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getMATERIAL() {
		return materialEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EAttribute getMATERIAL_Url() {
		return (EAttribute)materialEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getREQUIREMENT() {
		return requirementEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getREQUIREMENT_Materials() {
		return (EReference)requirementEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EClass getPREVIEW() {
		return previewEClass;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EReference getPREVIEW_Materials() {
		return (EReference)previewEClass.getEStructuralFeatures().get(0);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EEnum getCOURSEstatus() {
		return coursEstatusEEnum;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CourseFactory getCourseFactory() {
		return (CourseFactory)getEFactoryInstance();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isCreated = false;

	/**
	 * Creates the meta-model objects for the package.  This method is
	 * guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void createPackageContents() {
		if (isCreated) return;
		isCreated = true;

		// Create classes and their features
		coursEelementEClass = createEClass(COURS_EELEMENT);
		createEAttribute(coursEelementEClass, COURS_EELEMENT__NAME);
		createEAttribute(coursEelementEClass, COURS_EELEMENT__DESCRIPTION);

		coursEobjectEClass = createEClass(COURS_EOBJECT);
		createEAttribute(coursEobjectEClass, COURS_EOBJECT__ORDER);
		createEAttribute(coursEobjectEClass, COURS_EOBJECT__TITLE);
		createEAttribute(coursEobjectEClass, COURS_EOBJECT__AUTHORS);

		courseEClass = createEClass(COURSE);
		createEAttribute(courseEClass, COURSE__STATUS);
		createEAttribute(courseEClass, COURSE__KEYWORDS);
		createEReference(courseEClass, COURSE__LANGUAGES);

		languageEClass = createEClass(LANGUAGE);
		createEReference(languageEClass, LANGUAGE__COURSE_OBJECTS);
		createEReference(languageEClass, LANGUAGE__REQUIREMENT);
		createEReference(languageEClass, LANGUAGE__PREVIEW);

		chapterEClass = createEClass(CHAPTER);
		createEReference(chapterEClass, CHAPTER__COURSE_OBJECTS);

		learninGobjectEClass = createEClass(LEARNIN_GOBJECT);
		createEAttribute(learninGobjectEClass, LEARNIN_GOBJECT__TYPE);
		createEReference(learninGobjectEClass, LEARNIN_GOBJECT__MATERIALS);

		materialEClass = createEClass(MATERIAL);
		createEAttribute(materialEClass, MATERIAL__URL);

		requirementEClass = createEClass(REQUIREMENT);
		createEReference(requirementEClass, REQUIREMENT__MATERIALS);

		previewEClass = createEClass(PREVIEW);
		createEReference(previewEClass, PREVIEW__MATERIALS);

		// Create enums
		coursEstatusEEnum = createEEnum(COURS_ESTATUS);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private boolean isInitialized = false;

	/**
	 * Complete the initialization of the package and its meta-model.  This
	 * method is guarded to have no affect on any invocation but its first.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void initializePackageContents() {
		if (isInitialized) return;
		isInitialized = true;

		// Initialize package
		setName(eNAME);
		setNsPrefix(eNS_PREFIX);
		setNsURI(eNS_URI);

		// Create type parameters

		// Set bounds for type parameters

		// Add supertypes to classes
		coursEobjectEClass.getESuperTypes().add(this.getCOURSEelement());
		courseEClass.getESuperTypes().add(this.getCOURSEobject());
		languageEClass.getESuperTypes().add(this.getCOURSEelement());
		chapterEClass.getESuperTypes().add(this.getCOURSEobject());
		learninGobjectEClass.getESuperTypes().add(this.getCOURSEobject());
		materialEClass.getESuperTypes().add(this.getCOURSEelement());
		requirementEClass.getESuperTypes().add(this.getCOURSEelement());
		previewEClass.getESuperTypes().add(this.getCOURSEelement());

		// Initialize classes and features; add operations and parameters
		initEClass(coursEelementEClass, COURSEelement.class, "COURSEelement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getCOURSEelement_Name(), ecorePackage.getEString(), "name", null, 1, 1, COURSEelement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getCOURSEelement_Description(), ecorePackage.getEString(), "description", null, 1, 1, COURSEelement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(coursEobjectEClass, COURSEobject.class, "COURSEobject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getCOURSEobject_Order(), ecorePackage.getEInt(), "order", null, 1, 1, COURSEobject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getCOURSEobject_Title(), ecorePackage.getEString(), "title", null, 1, 1, COURSEobject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
		initEAttribute(getCOURSEobject_Authors(), ecorePackage.getEString(), "authors", null, 0, -1, COURSEobject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(courseEClass, com.bap.ele.workbench.model.Course.COURSE.class, "COURSE", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getCOURSE_Status(), this.getCOURSEstatus(), "status", null, 1, 1, com.bap.ele.workbench.model.Course.COURSE.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getCOURSE_Keywords(), ecorePackage.getEString(), "keywords", null, 0, -1, com.bap.ele.workbench.model.Course.COURSE.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getCOURSE_Languages(), this.getLANGUAGE(), null, "languages", null, 0, -1, com.bap.ele.workbench.model.Course.COURSE.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(languageEClass, com.bap.ele.workbench.model.Course.LANGUAGE.class, "LANGUAGE", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getLANGUAGE_CourseObjects(), this.getCOURSEobject(), null, "courseObjects", null, 0, -1, com.bap.ele.workbench.model.Course.LANGUAGE.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getLANGUAGE_Requirement(), this.getREQUIREMENT(), null, "requirement", null, 1, 1, com.bap.ele.workbench.model.Course.LANGUAGE.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getLANGUAGE_Preview(), this.getPREVIEW(), null, "preview", null, 1, 1, com.bap.ele.workbench.model.Course.LANGUAGE.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(chapterEClass, com.bap.ele.workbench.model.Course.CHAPTER.class, "CHAPTER", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getCHAPTER_CourseObjects(), this.getCOURSEobject(), null, "courseObjects", null, 0, -1, com.bap.ele.workbench.model.Course.CHAPTER.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(learninGobjectEClass, LEARNINGobject.class, "LEARNINGobject", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getLEARNINGobject_Type(), ecorePackage.getEString(), "type", null, 1, 1, LEARNINGobject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getLEARNINGobject_Materials(), this.getMATERIAL(), null, "materials", null, 0, -1, LEARNINGobject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(materialEClass, com.bap.ele.workbench.model.Course.MATERIAL.class, "MATERIAL", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getMATERIAL_Url(), ecorePackage.getEString(), "url", null, 1, 1, com.bap.ele.workbench.model.Course.MATERIAL.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(requirementEClass, com.bap.ele.workbench.model.Course.REQUIREMENT.class, "REQUIREMENT", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getREQUIREMENT_Materials(), this.getMATERIAL(), null, "materials", null, 0, -1, com.bap.ele.workbench.model.Course.REQUIREMENT.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(previewEClass, com.bap.ele.workbench.model.Course.PREVIEW.class, "PREVIEW", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getPREVIEW_Materials(), this.getMATERIAL(), null, "materials", null, 0, -1, com.bap.ele.workbench.model.Course.PREVIEW.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		// Initialize enums and add enum literals
		initEEnum(coursEstatusEEnum, COURSEstatus.class, "COURSEstatus");
		addEEnumLiteral(coursEstatusEEnum, COURSEstatus.NEW);
		addEEnumLiteral(coursEstatusEEnum, COURSEstatus.OPENED);
		addEEnumLiteral(coursEstatusEEnum, COURSEstatus.CLOSED);
		addEEnumLiteral(coursEstatusEEnum, COURSEstatus.PUBLISHED);

		// Create resource
		createResource(eNS_URI);
	}

} //CoursePackageImpl
